<extend name="../layout" />

<block name="main_content">
    <include file="Common:SettingsHeader:order" />
    <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-info-sign"></i> </span>
            <h5>{:L('orders_detail_list')}</h5>
            <a href="javascript:add();" class="label label-info">{:L('add_new')}</a>
        </div>
        <div class="widget-content nopadding">
            <table id="theTable" class="table table-bordered table-striped with-check" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <th style="width:100px">{:L("bill_code")}</th>
                        <th>{:L("factory_code_all")}</th>
                        <th>{:L("goods_name")}</th>
                        <th>{:L("color")}</th>
                        <th>{:L("standard")}</th>
                        <th>{:L("num")}</th>
                        <th>{:L("per_price")}</th>
                        <th>{:L("price")}</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="list" id="l">
                        <tr>
                            <td>
                                <if condition="$l.status neq 0">
                                    <a class="label label-info" href="javascript:viewDetail({$l.id})">{$l.bill_code}</a>
                                <else />
                                    {$l.bill_code}
                                </if>
                            </td>
                            <td>{$l.factory_code_all}</td>
                            <td>{$l.goods_name}</td>
                            <td>{$l.color_name}</td>
                            <td>{$l.standard_name}</td>
                            <td>{$l.num}</td>
                            <td>{$l.per_price}</td>
                            <td>{$l.price}</td>
                        </tr>
                    </volist>
                    <tr>
                        <td colspan="10">
                            <div class="pagination alternate"><ul>{$page}</ul></div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</block>

<block name="footer_js">
    <if condition="$sortField">
    <script type="text/javascript">
        $(function(){
            $("#theTable thead a[field='{$sortField}']").append('<i class="icon {$sortImg}"></i> ')
            .attr("href", "javascript:sortBy('{$sortField}','{$sort}','index')");
        });
    </script>
    </if>
</block>